Skip to content
This repository has been archived by the owner on Aug 18, 2020. It is now read-only.

[CBR-430] add version and configuration key to JSON logs #3603

Merged
merged 2 commits into from
Sep 17, 2018

Conversation

CodiePP
Copy link
Contributor

@CodiePP CodiePP commented Sep 15, 2018

Description

add cardano-sl version and configuration key to the "env" field in JSON logs.

Linked issue

CBR-430

Type of change

  • 🐞 Bug fix (non-breaking change which fixes an issue)
  • 🛠 New feature (non-breaking change which adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)
  • 🏭 Refactoring that does not change existing functionality but does improve things like code readability, structure etc
  • 🔨 New or improved tests for existing code
  • ⛑ git-flow chore (backport, hotfix, etc)

Developer checklist

  • I have read the style guide document, and my code follows the code style of this project.
  • [~] If my code deals with exceptions, it follows the guidelines.
  • [~] I have updated any documentation accordingly, if needed. Documentation changes can be reflected in opening a PR on cardanodocs.com, amending the inline Haddock comments, any relevant README file or one of the document listed in the docs directory.
  • [~] CHANGELOG entry has been added and is linked to the correct PR on GitHub.

Testing checklist

  • [~] I have added tests to cover my changes.
  • All new and existing tests passed.

QA Steps

Screenshots (if available)

{
  "at": "2018-09-13T22:57:32.067585Z",
  "env": "mainnet_wallet_macos64:1.3.0",
  "ns": [
    "cardano-sl",
    "*production*"
  ],
  "data": {},
  "app": [
    "cardano-sl"
  ],
  "msg": "Verifying and applying blocks...",
  "pid": "25767",
  "loc": null,
  "host": "hostname",
  "sev": "Info",
  "thread": "ThreadId 1996"
}

@CodiePP CodiePP self-assigned this Sep 15, 2018
@CodiePP CodiePP changed the title [CBR-430] added version and configuration key to JSON logs [CBR-430] add version and configuration key to JSON logs Sep 15, 2018
Copy link
Contributor

@ksaric ksaric left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

node/Main.hs Outdated
@@ -68,8 +69,9 @@ main = withCompileInfo $ do
args@(CLI.SimpleNodeArgs commonNodeArgs _) <- CLI.getSimpleNodeOptions
let loggingParams = CLI.loggingParams loggerName commonNodeArgs
let conf = CLI.configurationOptions (CLI.commonArgs commonNodeArgs)
let getKey = cfoKey conf
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

configurationKey? Then again, it's used all over the place with this convention 🤷‍♂️

explorer/test/Test/Pos/Explorer/Socket/MethodsSpec.hs Outdated Show resolved Hide resolved
networking/test/Test/NodeSpec.hs Outdated Show resolved Hide resolved
util/src/Pos/Util/Wlog/Compatibility.hs Show resolved Hide resolved
@CodiePP CodiePP force-pushed the adiemand/CBR-430/version_in_JSON branch from 3172ed8 to ccf3955 Compare September 17, 2018 10:03
Signed-off-by: Alexander Diemand <codieplusplus@apax.net>
Signed-off-by: Alexander Diemand <codieplusplus@apax.net>
@CodiePP CodiePP force-pushed the adiemand/CBR-430/version_in_JSON branch from ccf3955 to 2f4ef85 Compare September 17, 2018 13:27
@CodiePP
Copy link
Contributor Author

CodiePP commented Sep 17, 2018

now with setupTestLogging and setupTestTrace
rebased on develop

@CodiePP CodiePP merged commit 4f76908 into develop Sep 17, 2018
@CodiePP CodiePP deleted the adiemand/CBR-430/version_in_JSON branch September 17, 2018 20:53
KtorZ pushed a commit that referenced this pull request Nov 9, 2018
…n_in_JSON

[CBR-430] add version and configuration key to JSON logs
KtorZ pushed a commit to input-output-hk/cardano-wallet-legacy that referenced this pull request Nov 9, 2018
…hk/adiemand/CBR-430/version_in_JSON

[CBR-430] add version and configuration key to JSON logs
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants